package cn.tedu;

import cn.tedu.ba02.SomeService;
import cn.tedu.ba02.Student;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class MyTest02 {
    @Test
    public void test01(){
        String config="applicationContext.xml";
        ApplicationContext ac=new ClassPathXmlApplicationContext(config);
        SomeService proxy = (SomeService) ac.getBean("MyService");
        String lisi = proxy.doOther("lisi", 21);
        System.out.println(lisi);
    }


    @Test
    public void test02(){
        String config="applicationContext.xml";
        ApplicationContext ac=new ClassPathXmlApplicationContext(config);
        SomeService proxy = (SomeService) ac.getBean("MyService");
        Student xiix = proxy.doOther02("xiix", 23);
    }
}
